import service from '@/utils/request'

// @Tags MoldStartNotice
// @Summary 创建超模通知单
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.MoldStartNotice true "创建超模通知单"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /moldStartNotice/createMoldStartNotice [post]
export const createMoldStartNotice = (data) => {
  return service({
    url: '/moldStartNotice/createMoldStartNotice',
    method: 'post',
    data
  })
}

// @Tags MoldStartNotice
// @Summary 删除超模通知单
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.MoldStartNotice true "删除超模通知单"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /moldStartNotice/deleteMoldStartNotice [delete]
export const deleteMoldStartNotice = (params) => {
  return service({
    url: '/moldStartNotice/deleteMoldStartNotice',
    method: 'delete',
    params
  })
}

// @Tags MoldStartNotice
// @Summary 批量删除超模通知单
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除超模通知单"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /moldStartNotice/deleteMoldStartNotice [delete]
export const deleteMoldStartNoticeByIds = (params) => {
  return service({
    url: '/moldStartNotice/deleteMoldStartNoticeByIds',
    method: 'delete',
    params
  })
}

// @Tags MoldStartNotice
// @Summary 更新超模通知单
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.MoldStartNotice true "更新超模通知单"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /moldStartNotice/updateMoldStartNotice [put]
export const updateMoldStartNotice = (data) => {
  return service({
    url: '/moldStartNotice/updateMoldStartNotice',
    method: 'put',
    data
  })
}

// @Tags MoldStartNotice
// @Summary 用id查询超模通知单
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.MoldStartNotice true "用id查询超模通知单"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /moldStartNotice/findMoldStartNotice [get]
export const findMoldStartNotice = (params) => {
  const { version } = params;
  return service({
    url: version ? '/moldStartNotice/getMoldStartNoticeHistory': `/moldStartNotice/findMoldStartNotice`,
    method: 'get',
    params
  })
}

// @Tags MoldStartNotice
// @Summary 分页获取超模通知单列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取超模通知单列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /moldStartNotice/getMoldStartNoticeList [get]
export const getMoldStartNoticeList = (params) => {
  return service({
    url: '/moldStartNotice/getMoldStartNoticeList',
    method: 'get',
    params
  })
}

// 设置金脾打印状态
export const setMetalSpleenPrint = (data) => {
  return service({
    url: '/moldStartNotice/setMetalSpleenPrint',
    method: 'post',
    data
  })
}

// 起模通知单详情-新建板房付期
export const createMoldStartNoticeMoldHouse = (data) => {
  return service({
    url: '/moldStartNoticeMoldHouse/createMoldStartNoticeMoldHouse',
    method: 'post',
    data
  })
}

// 分页获取起模通知单-板房付期列表
export const getMoldStartNoticeMoldHouseList = (params) => {
  return service({
    url: '/moldStartNoticeMoldHouse/getMoldStartNoticeMoldHouseList',
    method: 'get',
    params
  })
}

// 起模通知单详情-审核板房付期
export const updateMoldStartNoticeMoldHouse = (data) => {
  return service({
    url: '/moldStartNoticeMoldHouse/updateMoldStartNoticeMoldHouse',
    method: 'put',
    data
  })
}

/**
 * 获取历史版本
 * @param {*} params 
 * @returns 
 */
export const getMoldStartNoticeHistoryList = (params) => {
  return service({
    url: '/moldStartNotice/getMoldStartNoticeHistoryList',
    method: 'get',
    params
  })
}
